package com.notecalendar.bo.impl;

import java.util.List;

import com.notecalendar.bo.NotesBo;
import com.notecalendar.dao.NotesDao;
import com.notecalendar.model.Notes;

/**
 * Class for implementing the definite methods in NotesBo
 * @author angelcereijo
 *
 */
public class NotesBoImpl implements NotesBo {
	
	//Dao object. Inject via spring
	private NotesDao notesDao;
	
	
	
	public NotesDao getNotesDao() {
		return notesDao;
	}

	public void setNotesDao(NotesDao notesDao) {
		this.notesDao = notesDao;
	}
	
	/**
	 * @see NotesBo#getNotes()
	 */
	public List<Notes> getNotes() {
		return notesDao.getNotes();
	}
	
	/**
	 * @see NotesBo#insertNote(Notes)
	 */
	public void insertNote(Notes note) {
		notesDao.addNote(note);
	}
	
	/**
	 * @see NotesBo#deleteNote(Notes)
	 */
	public void deleteNote(Notes note) {
		notesDao.delelteNote(note);
	}

}
